home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / prog / pas_all.zip / TI205.ASC < prev    next >
Text File  |  1991-09-11  |  44KB  |  1,783 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  8.                                                               : 205
  9.   VERSION : 1.00B & 1.00C
  10.        OS : PC-DOS
  11.      DATE : August 20, 1986                            PAGE : 1/33T
  12.  
  13.   TITLE : UPDATE TO VERSION 1.01A
  14.  
  15.  
  16.  
  17.  
  18.                                CONTENTS
  19.  
  20.  
  21.  
  22.  
  23.            Replace EditReformat             Pages  2 - 9
  24.  
  25.            Underline ON/OFF Toggle          Pages 10 - 11
  26.  
  27.            Flush Printer Buffer             Pages 12 - 13
  28.  
  29.            Tab Patch                        Page 14
  30.  
  31.            Memory Allocation Update         Page 15
  32.  
  33.            Restore Screen Update            Pages 16 - 17
  34.  
  35.            Erase String Update              Pages 18 - 19
  36.  
  37.            Accepting Path Names             Pages 20 - 21
  38.  
  39.            Word Wrap Update                 Pages 22 - 23
  40.  
  41.            Intent Text Update               Pages 24 - 25
  42.  
  43.            Block Copy Heap Corruption       Pages 26 - 28
  44.  
  45.            Prevent File Truncation          Pages 29 - 31
  46.               when printing
  47.  
  48.            Saving Text Format Settings      Pages 31 - 33
  49.  
  50.  
  51.        REPLACE EDITREFORMAT
  52.  
  53.   The following is a complete replacement for the procedure  EditReformat in
  54.   the Turbo Editor Toolbox. Note, this procedure exists in the two files:
  55.  
  56.    CMD.ED - .COM Files, Toolbox Source Diskette
  57.    CMD.MS - Microstar Source Diskette
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  74.                                                               : 205
  75.   VERSION : 1.00B & 1.00C
  76.        OS : PC-DOS
  77.      DATE : August 20, 1986                             PAGE : 2/33
  78.  
  79.   TITLE : UPDATE TO VERSION 1.01A
  80.  
  81.  
  82.  
  83.  
  84.   The procedure enables the user to reformat paragraphs that were created
  85.   without word wrap on. Reformatting is terminated by a blank line instead of
  86.   a "hard" return.
  87.  
  88.   1.   Load the file CMD.ED into the TURBO editor
  89.   2.   Search for the procedure EditDownLine
  90.   3.   Move the procedure EditDownLine to the top of the file by  doing a
  91.        block move.
  92.   4.   Comment out the old version of the procedure EditReformat by  placing
  93.        an open comment '(*' before the procedure and a close comment '*)' at
  94.        the end of the procedure.
  95.   5.   Type in the following procedure:
  96.  
  97.   overlay procedure EditReformat;
  98.  
  99.   { This  routine reformats text lines to fit within  the  current  margins
  100.   by moving  words to lower lines or  bringing words up from  lower  lines.
  101.   This starts at the current  line,  and   continues  until  the  end  of the
  102.   text stream,  or until an empty  line  is  encountered. }
  103.  
  104.   var
  105.     Pcol         : integer;
  106.     Endcol       : integer;
  107.     p            : Plinedesc;
  108.     q            : Plinedesc;
  109.     Reformatting : boolean;
  110.  
  111.     function EmptyLine(Lp : Plinedesc) : boolean;
  112.     {  Checks  to see if a line is empty.   We  use  this  function
  113.   instead  of the wrapped flag to determine when to  terminate
  114.   reformatting. }
  115.  
  116.        REPLACE EDITREFORMAT
  117.  
  118.       var
  119.         Pcol : integer;
  120.  
  121.       begin {EmptyLine of EditReformat}
  122.         EmptyLine := true;
  123.         with Lp^ do
  124.         for Pcol := 1 to BuffLen do
  125.           if Txt^ [Pcol] <> ' ' then
  126.           begin
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  140.                                                               : 205
  141.   VERSION : 1.00B & 1.00C
  142.        OS : PC-DOS
  143.      DATE : August 20, 1986                             PAGE : 3/33
  144.  
  145.   TITLE : UPDATE TO VERSION 1.01A
  146.  
  147.  
  148.  
  149.  
  150.             EmptyLine := false;
  151.             exit;
  152.           end;
  153.       end;  {EmptyLine of EditReformat}
  154.  
  155.     procedure EditCompressLine (Lp : Plinedesc);
  156.     { Changes all multiple spaces to single spaces in the
  157.       text buffer pointed to by the argument. This makes
  158.       the line chopping and appending algorithms
  159.       simpler and more understandable.  }
  160.  
  161.     var
  162.       i : integer;
  163.       j : integer;
  164.  
  165.     begin {EditCompressLine of EditReformat}
  166.       i := Lp^.BuffLen;
  167.       while (i > 1) and (Lp^.Txt^ [i] = ' ') do
  168.         i := Pred (i);
  169.       if i = 1 then
  170.         exit; {This means the line is entirely blank}
  171.       j := 1;
  172.       while (Lp^.Txt^ [j] = ' ') do  {Trim leading spaces}
  173.         j := Succ(j);
  174.       if j > 1 then
  175.       begin
  176.         move (Lp^.Txt^ [j], Lp^.Txt^ [1], Succ(Lp^.BuffLen - j));
  177.         fillchar (Lp^.Txt^ [Lp^.Bufflen - j + 2], Pred(j), ' ');
  178.         i := Succ(i - j);
  179.       end;
  180.  
  181.        REPLACE EDITREFORMAT
  182.  
  183.       j := 2;
  184.       while j < (i-1) do
  185.       begin
  186.         if (Lp^.Txt^ [Succ (j)] = ' ') and (Lp^.Txt^ [j] = ' ') then
  187.         begin  {We found at least two spaces in a row}
  188.           move (Lp^.Txt^ [Succ (j)], Lp^.Txt^ [j], i - j);
  189.           Lp^.Txt^ [i] := ' ';
  190.           i := Pred(i);   {Goal has shifted to the left one col}
  191.         end
  192.         else
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  206.                                                               : 205
  207.   VERSION : 1.00B & 1.00C
  208.        OS : PC-DOS
  209.      DATE : August 20, 1986                             PAGE : 4/33
  210.  
  211.   TITLE : UPDATE TO VERSION 1.01A
  212.  
  213.  
  214.  
  215.  
  216.           j := Succ(j);                 {Just a single space}
  217.       end;
  218.     end; {EditCompressLine of EditReformat}
  219.  
  220.     procedure EditShiftLine (Lp : Plinedesc);
  221.     { Ensures that the text in the buffer pointed
  222.       to by the argument has spaces in columns to
  223.       the left of Lmargin.  That makes the other
  224.       procedures easier to write. }
  225.  
  226.     var
  227.       i : integer;
  228.  
  229.     begin {EditShiftLine of EditReformat}
  230.       with Curwin^ do
  231.         if Lmargin > Lp^.BuffLen then
  232.           if not EditSizeline (Lp, Lmargin) then
  233.           begin
  234.             EditErrormsg (35);
  235.             Reformatting := false;
  236.             exit;
  237.           end;
  238.       i := 1;
  239.       with Curwin^ do
  240.         while (i < Lmargin) and (Lp^.Txt^ [i] = ' ') do
  241.           i := Succ (i);
  242.       if Lp^.Txt^ [i] = ' ' then
  243.         exit;    {Stuff before Lmargin is spaces}
  244.       if not EditSizeline(Lp, Lp^.BuffLen + Curwin^.Lmargin - i) then
  245.       begin
  246.         EditErrormsg (35);
  247.         Reformatting := false;
  248.         exit;
  249.       end;
  250.  
  251.        REPLACE EDITREFORMAT
  252.  
  253.  
  254.       with Curwin^ do
  255.         move (Lp^.Txt^ [i], Lp^.Txt^ [Lmargin], Lp^.BuffLen - Lmargin + i);
  256.       Fillchar (Lp^.Txt^ [1], Pred (Curwin^.Lmargin), ' ')
  257.     end; {EditShiftLine of EditReformat}
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  272.                                                               : 205
  273.   VERSION : 1.00B & 1.00C
  274.        OS : PC-DOS
  275.      DATE : August 20, 1986                             PAGE : 5/33
  276.  
  277.   TITLE : UPDATE TO VERSION 1.01A
  278.  
  279.  
  280.  
  281.  
  282.     procedure EditLongline;
  283.     { Handles the case where the current line contains
  284.       too much text for the current margins.  Here we
  285.       chop off the offending text and make a new line
  286.       for it, which in turn will be reformatted. It's
  287.       here that we have to worry about words too long
  288.       for current margins. }
  289.     begin  {EditLongline}
  290.       Pcol := Curwin^.Rmargin;
  291.       if p^.Txt^ [Curwin^.Rmargin] = ' ' then
  292.         while (p^.Txt^ [Pcol] = ' ') and (Pcol < p^.BuffLen) do
  293.           Pcol := Succ (Pcol)
  294.       else
  295.       begin
  296.         while (p^.Txt^ [Pcol] <> ' ') and (Pcol > Curwin^.Lmargin) do
  297.           Pcol := Pred (Pcol);
  298.         if (Pcol = Curwin^.Lmargin) and (p^.Txt^ [Pcol] <> ' ') then
  299.         begin
  300.           EditErrormsg (25);
  301.           Reformatting := false;
  302.           exit;
  303.         end;
  304.         Pcol := Succ (Pcol);
  305.       end;
  306.       q := p^.Fwdlink; {q points to line that was
  307.                         originally after p, if any}
  308.       p^.Fwdlink := EditMaktxtdes(Succ(Curwin^.Lmargin + Endcol - Pcol));
  309.       if p^.Fwdlink = nil then  { make new line for overflow }
  310.       begin
  311.         EditErrormsg (35);
  312.         Reformatting := false;
  313.         exit;
  314.       end;
  315.  
  316.        REPLACE EDITREFORMAT
  317.  
  318.       p^.Fwdlink^.Fwdlink := q;
  319.       p^.Fwdlink^.Backlink := p;
  320.       if q <> nil then
  321.         q^.Backlink := p^.FwdLink;
  322.       with Curwin^ do
  323.         Move (p^.Txt^ [Pcol], p^.Fwdlink^.Txt^ [Lmargin],
  324.               Endcol - Pcol + 1);
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  338.                                                               : 205
  339.   VERSION : 1.00B & 1.00C
  340.        OS : PC-DOS
  341.      DATE : August 20, 1986                             PAGE : 6/33
  342.  
  343.   TITLE : UPDATE TO VERSION 1.01A
  344.  
  345.  
  346.  
  347.  
  348.       Fillchar (p^.Txt^ [Pcol], Succ (Endcol - Pcol), ' ');
  349.       p := p^.Fwdlink; {point p at line we just created.
  350.                         q is next line, if any}
  351.     end; {EditLongline of EditReformat}
  352.  
  353.     procedure EditShortline;
  354.     { Handles the case where p points to a line
  355.       shorter than Rmargin. That means we have to
  356.       attempt to move some of the text from the line
  357.       pointed to by q into the current line. If q is
  358.       nil or that line is spacefilled, we stop the
  359.       reformat. }
  360.  
  361.     var
  362.       r : Plinedesc;
  363.       i : integer;
  364.  
  365.     begin {EditShortline of EditReformat}
  366.       if q = nil then
  367.       begin
  368.         Reformatting := false;
  369.         exit;
  370.       end;
  371.       if EmptyLine(q) then
  372.       begin
  373.         Reformatting := false;
  374.         exit;
  375.       end;
  376.       i := Curwin^.Lmargin;
  377.       while (i < Pred(Curwin^.Lmargin + Curwin^.Rmargin - Endcol)) and
  378.             (q^.Txt^ [i] <> ' ')  do
  379.         i := Succ (i);
  380.       if (q^.Txt^ [i] <> ' ') then
  381.       begin     {Word wouldn't fit, so advance to next line}
  382.         p := p^.Fwdlink;
  383.         if p = q then q := q^.Fwdlink;
  384.       end
  385.  
  386.        REPLACE EDITREFORMAT
  387.  
  388.         else
  389.         if not EditSizeline (p, Succ (Endcol + i - Curwin^.Lmargin)) then
  390.         begin
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  404.                                                               : 205
  405.   VERSION : 1.00B & 1.00C
  406.        OS : PC-DOS
  407.      DATE : August 20, 1986                             PAGE : 7/33
  408.  
  409.   TITLE : UPDATE TO VERSION 1.01A
  410.  
  411.  
  412.  
  413.  
  414.           EditErrormsg (35);
  415.           Reformatting := false;
  416.           exit;
  417.         end
  418.         else
  419.         begin                     {Bring up a word from q}
  420.           Move (q^.Txt^ [Curwin^.Lmargin], p^.Txt^ [Endcol + 2],
  421.                 i - Curwin^.Lmargin);
  422.           Fillchar (q^.Txt^ [Curwin^.Lmargin], i - Curwin^.Lmargin, ' ');
  423.           if EmptyLine(q) then { Delete q if now empty }
  424.           begin
  425.             if q^.Backlink = nil then
  426.             begin
  427.               Reformatting := False;
  428.               exit;
  429.             end
  430.             else
  431.               if q^.Fwdlink = nil then
  432.               begin
  433.                 q^.Backlink^.Fwdlink := nil;
  434.                 EditDelline (q);
  435.                 Reformatting := false;
  436.                 exit;
  437.               end;
  438.             q^.Backlink^.Fwdlink := q^.Fwdlink;
  439.             q^.Fwdlink^.Backlink := q^.Backlink;
  440.             r := q^.Fwdlink;
  441.             EditDelline (q);
  442.             q := r;
  443.           end;
  444.         end;
  445.     end; {EditShortline of EditReformat}
  446.  
  447.   begin {EditReformat}
  448.     EditUpdphyscr; {Print "wait" on command line}
  449.     with Curwin^ do
  450.     begin
  451.       if EmptyLine(CurLine) then
  452.       begin                             {If this line is empty,}
  453.         EditDownline;                   {go to next line and quit}
  454.         Colno := 1;
  455.         exit;
  456.       end;
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  470.                                                               : 205
  471.   VERSION : 1.00B & 1.00C
  472.        OS : PC-DOS
  473.      DATE : August 20, 1986                             PAGE : 8/33
  474.  
  475.   TITLE : UPDATE TO VERSION 1.01A
  476.  
  477.  
  478.  
  479.  
  480.       REPLACE EDITREFORMAT
  481.  
  482.       EditChangeFlag := true;
  483.       p := Curline;
  484.       Pcol := Colno;
  485.       q := Curline^.Fwdlink;
  486.       Reformatting := true;   {Any routine turns this off to quit}
  487.       while Reformatting do
  488.       begin
  489.         Curline := p;
  490.         Colno := Pcol;
  491.         EditCompressLine (p); {Delete multiple space areas from line}
  492.         EditShiftLine (p);    {Start it at Lmargin}
  493.         if q <> nil then
  494.         begin
  495.           EditCompressLine (q);
  496.           EditShiftLine (q)
  497.         end;
  498.         Endcol := p^.BuffLen; {Determine if it's too long or short}
  499.         while (Endcol > Lmargin) and (p^.Txt^ [Endcol] = ' ') do
  500.           Endcol := Pred (Endcol);
  501.         if Endcol > Rmargin then
  502.           EditLongline
  503.         else
  504.           if Endcol < Rmargin then
  505.             EditShortline
  506.           else
  507.           begin
  508.             p := p^.Fwdlink;
  509.             if q = p then q := q^.Fwdlink
  510.           end;
  511.           if p = nil then
  512.             Reformatting := false
  513.           else
  514.             if EmptyLine(p) then
  515.               Reformatting := false
  516.             else
  517.               if Abortcmd then
  518.                 Reformatting := false;
  519.       end;
  520.       if Curline^.FwdLink <> nil then
  521.       begin
  522.         Curline := Curline^.FwdLink;
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  536.                                                               : 205
  537.   VERSION : 1.00B & 1.00C
  538.        OS : PC-DOS
  539.      DATE : August 20, 1986                             PAGE : 9/33
  540.  
  541.   TITLE : UPDATE TO VERSION 1.01A
  542.  
  543.  
  544.  
  545.  
  546.         Colno := 1;
  547.       end
  548.  
  549.        REPLACE EDITREFORMAT
  550.  
  551.       else
  552.         EditEndLine;
  553.     end; {with}
  554.     UpdCurFlag := true;
  555.     EditRealign;               {We've really changed things}
  556.   end; {EditReformat}
  557.  
  558.  
  559.   6.   Save the new version of the procedure EditReformat to a file by doing
  560.        a block write.
  561.   7.   Load the file CMD.MS into the TURBO editor and comment out the  old
  562.        version of the procedure EditReformat. (See step 4)
  563.   8.   Read in the new version of the procedure EditReformat by  doing a
  564.        block read.
  565.  
  566.    UNDERLINE ON/OFF TOGGLE
  567.  
  568.   The changes to the Turbo Editor Toolbox described in this handout  enable
  569.   you to print underlined text after the underline attribute has been turned
  570.   on then back off.
  571.  
  572.     The routine to be modified is called:
  573.  
  574.     procedure Translate (var Ch : char);
  575.  
  576.     This routine exists in the file:
  577.  
  578.       PRINT.MS - MicroStar Source diskette
  579.  
  580.  
  581.   The modified  code is listed in the routine below with a comment
  582.   at the  end of the line: { Ver. 1.01A - ... }.
  583.  
  584.   NOTES:
  585.  
  586.   1.   These modifications will update Turbo Editor Toolbox to version 1.01A.
  587.        Therefore, you need to update the version numbers of the files:
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  602.                                                               : 205
  603.   VERSION : 1.00B & 1.00C
  604.        OS : PC-DOS
  605.      DATE : August 20, 1986                            PAGE : 10/33
  606.  
  607.   TITLE : UPDATE TO VERSION 1.01A
  608.  
  609.  
  610.  
  611.  
  612.        MS.PAS, and PRINT.MS. Also, update the copy-right message for
  613.        MicroStar in MS.PAS.
  614.  
  615.   2.   Make these modifications on a COPY of the master diskettes, do NOT
  616.        modify your master diskettes.
  617.  
  618.  
  619.        UNDERLINE ON/OFF TOGGLE
  620.  
  621.  
  622.     The  following  are step-by-step instructions  for  making  the
  623.     modifications:
  624.  
  625.       1. Load the file PRINT.MS into the Turbo Pascal editor.
  626.       2. In the procedure, translate,
  627.  
  628.          Change from:
  629.            .
  630.            .
  631.            .
  632.         19: if UndScore then                     { Underlining toggle }
  633.               begin
  634.                 Ch := #27;
  635.                 pushchar(#0);
  636.                 pushchar('-');
  637.               end
  638.             else
  639.            .
  640.            .
  641.            .
  642.  
  643.         Change to:
  644.            .
  645.            .
  646.            .
  647.         19: if UndScore then                    { Underlining toggle }
  648.               begin
  649.                 Ch := #27;
  650.                 pushchar(#0);
  651.                 pushchar('-');
  652.                 UndScore := false;            { Ver. 1.01A Addition }
  653.               end
  654.             else
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  668.                                                               : 205
  669.   VERSION : 1.00B & 1.00C
  670.        OS : PC-DOS
  671.      DATE : August 20, 1986                            PAGE : 11/33
  672.  
  673.   TITLE : UPDATE TO VERSION 1.01A
  674.  
  675.  
  676.  
  677.  
  678.            .
  679.            .
  680.            .
  681.  
  682.  
  683.        FLUSH PRINTER BUFFER
  684.  
  685.   The  following  modifications  cause  the printer  buffer  to  be  flushed
  686.   after finding the end of a print file.  This ensures that  the  last line
  687.   of a file will be printed even if it has not  been  terminated with a
  688.   return.
  689.  
  690.   The routines to be modified are called:
  691.  
  692.         procedure Translate
  693.         procedure PrintChar
  694.  
  695.   In the file PRINT.MS - MicroStar Source Diskette
  696.  
  697.   1. Load the file PRINT.MS into the Turbo Pascal editor.
  698.   2. In the procedure Translate
  699.  
  700.      Change from:
  701.           .
  702.           .
  703.           .
  704.             end;
  705.       end {case}
  706.   end; {Translate}
  707.  
  708.      Change to:
  709.           .
  710.           .
  711.           .
  712.             end;
  713.         26: begin             { ver. 1.01A addition }
  714.               Ch := #13;      { ver. 1.01A addition }
  715.               pushchar(#10);  { ver. 1.01A addition }
  716.             end;              { ver. 1.01A addition }
  717.       end {case}
  718.   end; {Translate}
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  734.                                                               : 205
  735.   VERSION : 1.00B & 1.00C
  736.        OS : PC-DOS
  737.      DATE : August 20, 1986                            PAGE : 12/33
  738.  
  739.   TITLE : UPDATE TO VERSION 1.01A
  740.  
  741.  
  742.  
  743.  
  744.      FLUSH PRINTER BUFFER
  745.  
  746.   3. In the procedure PrintChar
  747.  
  748.      Change from:
  749.           .
  750.           .
  751.           .
  752.     if PrintBufferPtr = 128 then
  753.     begin
  754.       if eof(PrintFile) then  { if end of source then call }
  755.  
  756.  
  757.      Change to:
  758.           .
  759.           .
  760.           .
  761.     if (PrintBufferPtr = 128) or { if buffer is empty then }
  762.                                  { ver. 1.01A modification }
  763.        (PrintBuffer[PrintBufferPtr] = #0) then { ver. 1.01A addition }
  764.     begin
  765.       fillchar(PrintBuffer,sizeof(PrintBuffer),#0);
  766.                                  { ver. 1.01A addition }
  767.       if eof(PrintFile) then     { if end of source then call }
  768.  
  769.   4.  In the procedure PrintChar
  770.  
  771.       Delete the following statements:
  772.  
  773.     if ch = #$1A then { check for end of file }
  774.                       { ver. 1.01A deletion }
  775.     begin             { ver. 1.01A deletion }
  776.       PrintExit;      { ver. 1.01A deletion }
  777.       exit;           { ver. 1.01A deletion }
  778.     end;              { ver. 1.01A deletion }
  779.  
  780.   5. Exit the Turbo Pascal editor and save the file.
  781.  
  782.  
  783.        TAB PATCH
  784.  
  785.   This patch enables the tab function to operate correctly when the  cursor
  786.   is in Tabposition -1.
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  800.                                                               : 205
  801.   VERSION : 1.00B & 1.00C
  802.        OS : PC-DOS
  803.      DATE : August 20, 1986                            PAGE : 13/33
  804.  
  805.   TITLE : UPDATE TO VERSION 1.01A
  806.  
  807.  
  808.  
  809.  
  810.   NOTE:  The modifications to the code are connoted by the comment:
  811.  
  812.                   { Ver. 1.01A Modification }
  813.  
  814.   The routine to be modified is called:
  815.  
  816.         procedure Edittab
  817.  
  818.   The routine is located in the files:
  819.  
  820.              CMD.ED, - .COM Files, Toolbox Source Diskette
  821.              FASTCMD.MS - MicroStar Source Diskette
  822.  
  823.   1.  Load the file CMD.ED into the editor.
  824.   2.  In the procedure Edittab:
  825.  
  826.       Change from:
  827.  
  828.       with Curwin^ do
  829.         begin
  830.           c := (Colno div Tabsize) * Tabsize + Succ (Tabsize);
  831.           if (Insertflag = Typeover) or (Colno > Curline^.BuffLen) then
  832.  
  833.       Change to:
  834.  
  835.       with Curwin^ do
  836.         begin
  837.           c := (pred(Colno) div Tabsize) * Tabsize + Succ (Tabsize);
  838.                                         { Ver. 1.01A Modification }
  839.           if (Insertflag = Typeover) or (Colno > Curline^.BuffLen)
  840.           then
  841.  
  842.   3.  Load the file FASTCMD.MS into the editor and repeat step 2.
  843.  
  844.       MEMORY ALLOCATION UPDATE
  845.  
  846.   The  following patch prevents extra space from being allocated at  the  end
  847.   of  a line when a carriage return is  inserted  in  the  middle of a line.
  848.  
  849.   The routine to be modified is called:
  850.  
  851.      procedure EditNewLine;
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  866.                                                               : 205
  867.   VERSION : 1.00B & 1.00C
  868.        OS : PC-DOS
  869.      DATE : August 20, 1986                            PAGE : 14/33
  870.  
  871.   TITLE : UPDATE TO VERSION 1.01A
  872.  
  873.  
  874.  
  875.  
  876.   This routine is in the file:
  877.  
  878.      CMD.ED - .COM files, Toolbox Source Diskette
  879.      FASTCMD.ED - MicroStar Source Diskette
  880.  
  881.   The modifications to the code below are indicated by a comment at  the end
  882.   of the line:
  883.  
  884.       { Ver. 1.01A modification }
  885.  
  886.  
  887.   1. Load the file CMD.ED into your Turbo Pascal editor.
  888.   2. In the procedure EditNewLine.
  889.  
  890.      Change from:
  891.        while (c > 1) and (p^.Txt^ [c] = ' ') do c := Pred (c);
  892.        L := Succ (p^.BuffLen - Colno);
  893.        if L < 1 then L := 1;
  894.  
  895.      Change to:
  896.        while (c > 1) and (p^.Txt^ [c] = ' ') do c := Pred (c);
  897.        L := Succ (c - Colno);   { ver. 1.01A modification }
  898.        if L < 1 then L := 1;
  899.  
  900.   3. Exit the editor and save the file.
  901.   4. Load the file FASTCMD.MS into the Turbo Pascal editor and repeat
  902.      steps 2 and 3.
  903.  
  904.  
  905.        SCREEN RESTORE UPDATE
  906.  
  907.   The  change to the Turbo Editor Toolbox described in this section  enables
  908.   Microstar to restore the screen after escaping from  the  copy file
  909.   command.
  910.  
  911.   The routine to be modified is called:
  912.  
  913.      overlay procedure CopyFile;
  914.  
  915.   This routine is in the file:
  916.  
  917.      MSCMD.MS - MicroStar Source Diskette
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  932.                                                               : 205
  933.   VERSION : 1.00B & 1.00C
  934.        OS : PC-DOS
  935.      DATE : August 20, 1986                            PAGE : 15/33
  936.  
  937.   TITLE : UPDATE TO VERSION 1.01A
  938.  
  939.  
  940.  
  941.  
  942.   The modifications to the code below are indicated by a comment at
  943.   the end of the line:
  944.  
  945.       { Ver. 1.01A - modification }
  946.  
  947.  
  948.   NOTES:
  949.  
  950.   1.   These modifications will update the Turbo Editor Toolbox  to version
  951.        1.01A. Therefore, you need to update the  version numbers of the
  952.        files: MS.PAS, MSCMD.MS, and the  copyright message for MicroStar in
  953.        MS.PAS.
  954.  
  955.   2.   Make these modifications on a COPY of the master  diskette - do NOT
  956.        modify your master diskettes.
  957.  
  958.    SCREEN RESTORE UPDATE
  959.  
  960.   The  following  are  step-by-step  instructions  for  making  the
  961.   modification:
  962.  
  963.        1.  Load the file MSCMD.MS into the Turbo Pascal editor.
  964.  
  965.        2.  In the procedure Copyfile, Change from:
  966.               .
  967.               .
  968.               .
  969.  
  970.       If Target = #27 then Target := '';
  971.       if (Target = '') or (Target = Source) then
  972.         exit;
  973.  
  974.       MenuColor := WLowColor;  { valid target file, already exists? }
  975.               .
  976.               .
  977.               .
  978.  
  979.            Change to:
  980.               .
  981.               .
  982.               .
  983.  
  984.       If Target = #27 then Target := '';
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  998.                                                               : 205
  999.   VERSION : 1.00B & 1.00C
  1000.        OS : PC-DOS
  1001.      DATE : August 20, 1986                            PAGE : 16/33
  1002.  
  1003.   TITLE : UPDATE TO VERSION 1.01A
  1004.  
  1005.  
  1006.  
  1007.  
  1008.       if (Target = '') or (Target = Source) then
  1009.       begin                                  { vs 1.01A addition }
  1010.         RestoreWindow(cl,ln,wd,hg);          { vs 1.01A addition }
  1011.  
  1012.       exit;
  1013.       end;                                   { vs 1.01A addition }
  1014.       MenuColor := WLowColor;  { valid target file, already exists? }
  1015.               .
  1016.               .
  1017.               .
  1018.  
  1019.        ERASE STRING UPDATE
  1020.  
  1021.   The  change to the Turbo Editor Toolbox described in this section  enables
  1022.   MicroStar  to erase a string correctly  when  the  first  character is
  1023.   entered for a new string.
  1024.  
  1025.   The routine to be modified is called:
  1026.  
  1027.      function GetString;
  1028.  
  1029.   This routine is in the file:
  1030.  
  1031.      SCREEN.MS - MicroStar Source Diskette
  1032.  
  1033.   The modifications to the code below are indicated by a comment at
  1034.   the end of the line:
  1035.  
  1036.       { Ver. 1.01A - modification }
  1037.  
  1038.  
  1039.   NOTES:
  1040.  
  1041.   1.   These modifications will update the Turbo Editor Toolbox  to version
  1042.        1.01A. Therefore, you need to update the  version numbers of the
  1043.        files: MS.PAS, SCREEN.MS, and the  copyright message for MicroStar in
  1044.        MS.PAS.
  1045.  
  1046.   2.   Make these modifications on a COPY of the master  diskettes - do NOT
  1047.        modify your master diskettes.
  1048.  
  1049.    ERASE STRING UPDATE
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  1064.                                                               : 205
  1065.   VERSION : 1.00B & 1.00C
  1066.        OS : PC-DOS
  1067.      DATE : August 20, 1986                            PAGE : 17/33
  1068.  
  1069.   TITLE : UPDATE TO VERSION 1.01A
  1070.  
  1071.  
  1072.  
  1073.  
  1074.   The  following  are  step-by-step  instructions  for  making  the
  1075.   modification:
  1076.  
  1077.        1.  Load the file SCREEN.MS into the Turbo Pascal editor.
  1078.        2.  In the function GetStringChange from:
  1079.               .
  1080.               .
  1081.               .
  1082.         if (ch in CharFilter) and (byte(St[0]) < Maxlen) then
  1083.           begin                      { check that character is legal }
  1084.             if newstr then
  1085.               .
  1086.               .
  1087.               .
  1088.  
  1089.  
  1090.            Change to:
  1091.               .
  1092.               .
  1093.               .
  1094.         if (ch in CharFilter) then             {vs 1.01A modification}
  1095.           if (byte(St[0]) < Maxlen) or NewStr then {vs 1.01A addition}
  1096.           begin                       { check that character is legal }
  1097.             if newstr then
  1098.               .
  1099.               .
  1100.               .
  1101.  
  1102.  
  1103.        ACCEPTING PATH NAMES
  1104.  
  1105.   The  change to the Turbo Editor Toolbox described in this section  enables
  1106.   Microstar to accept path names when specifying a file  to  print.
  1107.  
  1108.   The routine to be modified is called:
  1109.  
  1110.      overlay procedure Printinit;
  1111.  
  1112.   This routine is in the file:
  1113.  
  1114.      MSCMD.MS  - MicroStar Source Diskette
  1115.  
  1116.   The modifications to the code below are indicated by a comment at
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  1130.                                                               : 205
  1131.   VERSION : 1.00B & 1.00C
  1132.        OS : PC-DOS
  1133.      DATE : August 20, 1986                            PAGE : 18/33
  1134.  
  1135.   TITLE : UPDATE TO VERSION 1.01A
  1136.  
  1137.  
  1138.  
  1139.  
  1140.   the end of the line:
  1141.  
  1142.       { Ver. 1.01A - modification }
  1143.  
  1144.  
  1145.   NOTES:
  1146.  
  1147.   1.   These modifications will update the Turbo Editor Toolbox  to version
  1148.        1.01A. Therefore, you need to update the  version numbers of the
  1149.        files: MS.PAS, MSCMD.MS, and the  copyright message for MicroStar in
  1150.        MS.PAS.
  1151.  
  1152.   2.   Make these modifications on a COPY of the master  diskettes - do NOT
  1153.        modify your master diskettes.
  1154.  
  1155.  
  1156.    ACCEPTING PATH NAMES
  1157.  
  1158.   The  following  are  step-by-step  instructions  for  making  the
  1159.   modification:
  1160.  
  1161.   1.  Load the file MSCMD.MS into the Turbo Pascal editor.
  1162.  
  1163.   2.  In the procedure PrintInit, Change from
  1164.          .
  1165.          .
  1166.          .
  1167.       SetmemAddress(cl + 2, ln + 1);
  1168.       Writestring(prompt);
  1169.       CharFilter := ['0'..'9','..'Z',':','.','_','$'];
  1170.       MenuColor := WNormColor;
  1171.       PrintFilename := GetString(cl + 27,ln + 1,40,PrintFilename,true);
  1172.  
  1173.       Change to:
  1174.          .
  1175.          .
  1176.          .
  1177.       SetmemAddress(cl + 2, ln + 1);
  1178.       Writestring(prompt);
  1179.       CharFilter := ['0'..'9','..'Z',':','.','_','$','\','_'];
  1180.                             { vs 1.01A modification }
  1181.       MenuColor := WNormColor;
  1182.       PrintFilename := GetString(cl + 27,ln + 1,40,PrintFileName,true);
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  1196.                                                               : 205
  1197.   VERSION : 1.00B & 1.00C
  1198.        OS : PC-DOS
  1199.      DATE : August 20, 1986                            PAGE : 19/33
  1200.  
  1201.   TITLE : UPDATE TO VERSION 1.01A
  1202.  
  1203.  
  1204.  
  1205.  
  1206.        WORD WRAP UPDATE
  1207.  
  1208.   The change to the Turbo Editor Toolbox described in this section
  1209.   prevents MicroStar from losing the second half of a line when the left and
  1210.   right margins are set and word wrap is on.
  1211.  
  1212.   The routine to be modified is called:
  1213.  
  1214.      overlay procedure EditCenterLine;
  1215.  
  1216.   This routine is in the file:
  1217.  
  1218.      OCMD.MS - MicroStar Source Diskette
  1219.  
  1220.   There is only one modification to be made to the code below. It is listed
  1221.   with a comment at the end of the line:
  1222.  
  1223.    { Ver. 1.01A - modification }
  1224.  
  1225.  
  1226.   NOTES:
  1227.  
  1228.   1.   These modifications will update the Turbo Editor Toolbox  to version
  1229.        1.01A. Therefore, you need to update the version  numbers of the
  1230.        files: MS.PAS, FIRST-ED.PAS, OCMD.MS, and  the copywrite message for
  1231.        MicroStar in MS.PAS.
  1232.  
  1233.   2.   Make these modifications on a COPY of the master  diskettes - do NOT
  1234.        modify your master diskettes.
  1235.  
  1236.        The following are step-by-step instructions for making the
  1237.        modification:
  1238.  
  1239.        1.  Load the file OCMD.MS into the Turbo Pascal editor.
  1240.        2.  In the procedure EditCenterLine, Change from:
  1241.  
  1242.               .
  1243.               .
  1244.               .
  1245.            Disp := Succ((Llen - Tlen) div 2);
  1246.            if not EditSizeline(Curline,Succ(Disp + Tlen)) then
  1247.            begin
  1248.  
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  1262.                                                               : 205
  1263.   VERSION : 1.00B & 1.00C
  1264.        OS : PC-DOS
  1265.      DATE : August 20, 1986                            PAGE : 20/33
  1266.  
  1267.   TITLE : UPDATE TO VERSION 1.01A
  1268.  
  1269.  
  1270.  
  1271.  
  1272.        WORD WRAP UPDATE
  1273.               .
  1274.               .
  1275.               .
  1276.            Change to:
  1277.               .
  1278.               .
  1279.               .
  1280.            Disp := Succ((Llen - Tlen) div 2);
  1281.            if not EditSizeline(Curline,Succ(Disp + Llen)) then
  1282.            { Ver. 1.01A - Modification }
  1283.            begin
  1284.               .
  1285.               .
  1286.               .
  1287.  
  1288.        INDENT TEXT UPDATE
  1289.  
  1290.   The  changes  to Turbo Editor Toolbox described in  this  section  enable
  1291.   the Turbo Editor Toolbox to correctly indent text when the  left margin has
  1292.   been set and a <Return> is inserted in the middle  of a line.
  1293.  
  1294.   The routine to be modified is called:
  1295.  
  1296.        procedure EditNewLine;
  1297.  
  1298.   This routine is in two files:
  1299.  
  1300.        FASTCMD.MS - Microstar Source Diskette
  1301.        CMD.ED - .COM files, Toolbox Source Diskette
  1302.  
  1303.   The modified lines of code are listed in the routine below with a comment
  1304.   at the end of the line (Ver. 1.01A - ...). The comment indicates when  the
  1305.   code is an addition, deletion, or a modification.
  1306.  
  1307.  
  1308.   NOTES:
  1309.  
  1310.  
  1311.   1.   These modifications will update the Turbo Editor Toolbox  to version
  1312.        1.01A. Therefore, you need to update the version  numbers of the
  1313.        files: MS.PAS, FIRST-ED.PAS, FASTCMD.MS,  CMD.ED and the copywrite
  1314.        message for Microstar in MS.PAS.
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  1328.                                                               : 205
  1329.   VERSION : 1.00B & 1.00C
  1330.        OS : PC-DOS
  1331.      DATE : August 20, 1986                            PAGE : 21/33
  1332.  
  1333.   TITLE : UPDATE TO VERSION 1.01A
  1334.  
  1335.  
  1336.  
  1337.  
  1338.   2.   Make these modifications on a COPY of the master  diskettes - do NOT
  1339.        modify your master diskettes.
  1340.  
  1341.    INDENT TEXT
  1342.  
  1343.   The following are step-by-step instructions for making the modfications:
  1344.  
  1345.        1.  Load the file CMD.ED into the Turbo Pascal editor.
  1346.  
  1347.        2.  In the procedure EditNewLine, Change from:
  1348.               .
  1349.               .
  1350.               .
  1351.            L := Succ (p^.BuffLen - Colno);
  1352.            if L < 1 then L := 1;
  1353.            if not EditSizeline (Curline, L) then
  1354.            begin
  1355.              EditErrormsg (35);
  1356.              EditRealign;
  1357.              exit
  1358.            end;
  1359.  
  1360.            if c >= Colno then
  1361.            begin
  1362.              Move (p^.Txt^ [Colno], Curline^.Txt^ [l], L);
  1363.              Fillchr (p^.Txt^ [Colno], L, ' ')
  1364.            end;
  1365.                .
  1366.                .
  1367.                .
  1368.         Change to:
  1369.                .
  1370.                .
  1371.                .
  1372.            L := Succ (C - Colno);       {Ver. 1.01A Modification}
  1373.            if L < 1 then L := 1;
  1374.            if  not  EditSizeline(Curline,L + Lmargin) then { Ver.
  1375.            1.01A - modification }
  1376.            Begin
  1377.              EditErrormsg (35);
  1378.              EditRealign;
  1379.              exit
  1380.            end;
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  1394.                                                               : 205
  1395.   VERSION : 1.00B & 1.00C
  1396.        OS : PC-DOS
  1397.      DATE : August 20, 1986                            PAGE : 22/33
  1398.  
  1399.   TITLE : UPDATE TO VERSION 1.01A
  1400.  
  1401.  
  1402.  
  1403.  
  1404.            if c >= Colno then
  1405.  
  1406.      INDENT TEXT
  1407.  
  1408.            begin
  1409.              fillchar(Curline^.txt^[1],L  +  Lmargin,' ');   {Ver.
  1410.   1.01A - addition }
  1411.              Move(p^.Txt^ [Colno],  Curline^.Txt^ [Lmargin],  L);
  1412.              {Ver. 1.01A - modification }
  1413.              Fillchar (p^.Txt^ [Colno], L, ' ')
  1414.            end;
  1415.  
  1416.                .
  1417.                .
  1418.                .
  1419.  
  1420.        3.  Load the file FASTCMD.MS into the Turbo Pascal editor.
  1421.        4.  Repeat step 2
  1422.  
  1423.        BLOCK COPY HEAP CORRUPTION UPDATE
  1424.  
  1425.   The changes to the Turbo Editor Toolbox described in this section are to
  1426.   prevent the corruption of the heap when doing a block copy.
  1427.  
  1428.   The routine to be modified is called:
  1429.  
  1430.        procedure EditBlockCopy
  1431.  
  1432.   This routine is in two files:
  1433.  
  1434.        KCMD.MS - MicroStar Source Diskette
  1435.        KCMD.ED .COM files, Toolbox Source Diskette
  1436.  
  1437.   The modified lines of code are listed in the routine below with a comment
  1438.   at the end of the line (Ver. 1.01A - ...). The comment indicates when  the
  1439.   code is an addition, deletion, or a modification.
  1440.  
  1441.  
  1442.   NOTES:
  1443.  
  1444.   1.   These modifications will update the Turbo Editor Toolbox to  version
  1445.        1.01A. Therefore, you need to update the version  numbers of the
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  1460.                                                               : 205
  1461.   VERSION : 1.00B & 1.00C
  1462.        OS : PC-DOS
  1463.      DATE : August 20, 1986                            PAGE : 23/33
  1464.  
  1465.   TITLE : UPDATE TO VERSION 1.01A
  1466.  
  1467.  
  1468.  
  1469.  
  1470.        files: MS.PAS, FIRST-ED.PAS, KCMD.ED,  KCMD.MS and the copywrite
  1471.        message for MicroStar in MS.PAS.
  1472.  
  1473.   2.   Make these modifications on a COPY of the master  diskettes - do NOT
  1474.        modify your master diskettes.
  1475.  
  1476.  
  1477.   The following  are  step-by-step  instructions  for  making  the
  1478.   modifications:
  1479.  
  1480.        1.  Load the file KCMD.ED into the Turbo Pascal editor.
  1481.        2.  In the procedure EditBlockCopy, Change from:
  1482.               .
  1483.               .
  1484.               .
  1485.  
  1486.        BLOCK COPY HEAP CORRUPTION UPDATE
  1487.  
  1488.            with Curwin^ do
  1489.              begin
  1490.                Match := true;
  1491.                for i := 1 to Curline^.Bufflen do
  1492.                  if Curline^.Txt^ [i] <> ' ' then Match := false;
  1493.                if (Curline^.Backlink = nil) and
  1494.                   (Curline^.Fwdlink = nil) and Match then
  1495.  
  1496.              begin                        { copy first record }
  1497.                Move (p^.Txt^, Curline^.Txt^, p^.Bufflen);
  1498.                Curline^.Fwdlink := p^.Fwdlink;
  1499.                Curline^.Flags := p^.Flags;
  1500.                u := p^.Fwdlink;
  1501.                EditDestxtdes (p);
  1502.                if u <> nil then
  1503.                  u^.Backlink := Curline
  1504.              end
  1505.  
  1506.                .
  1507.                .
  1508.                .
  1509.            Change to:
  1510.                .
  1511.                .
  1512.                .
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  1526.                                                               : 205
  1527.   VERSION : 1.00B & 1.00C
  1528.        OS : PC-DOS
  1529.      DATE : August 20, 1986                            PAGE : 24/33
  1530.  
  1531.   TITLE : UPDATE TO VERSION 1.01A
  1532.  
  1533.  
  1534.  
  1535.  
  1536.              with Curwin^ do
  1537.              begin
  1538.                Match := true;
  1539.                for i := 1 to Curline^.Bufflen do
  1540.                  if Curline^.Txt^ [i] <> ' ' then Match := false;
  1541.                if (Curline^.Backlink = nil) and
  1542.                  Curline^.Fwdlink = nil) and Match then
  1543.                begin                     { copy first record}
  1544.                  if EditSizeLine(Curline,p^.Bufflen) then  { Ver.
  1545.                  1.01A - Addition }
  1546.                  begin
  1547.                    Move (p^.Txt^, Curline^.Txt^, p^.Bufflen);
  1548.                    Curline^.Fwdlink := p^.Fwdlink;
  1549.                    Curline^.Flags := p^.Flags;
  1550.                    u := p^.Fwdlink:
  1551.                    EditDestxtdes (p)
  1552.                    if u <> nil then
  1553.                      u^.Backlink := Curline;
  1554.                  end                       { Ver. 1.01A - Addition }
  1555.  
  1556.      BLOCK COPY HEAP CORRUPTION UPDATE
  1557.  
  1558.                  else                   { Ver. 1.01A - Addition }
  1559.                  begin                  { Ver. 1.01A - Addition }
  1560.                    EditErrormsg (35);   { Ver. 1.01A - Addition }
  1561.                    exit;                { Ver. 1.01A - Addition }
  1562.                  end;                   { Ver. 1.01A - Addition }
  1563.                end
  1564.                  .
  1565.                  .
  1566.                  .
  1567.  
  1568.        3.  Load the file KCMD.MS into the Editor.
  1569.        4.  Repeat step 2.
  1570.  
  1571.  
  1572.  
  1573.        PREVENTS FILE TRUCATION WHEN PRINTING
  1574.  
  1575.   The changes to the ETBX in this section prevent MicroStar from  truncating
  1576.   the end of a file when it is printed.
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  1592.                                                               : 205
  1593.   VERSION : 1.00B & 1.00C
  1594.        OS : PC-DOS
  1595.      DATE : August 20, 1986                            PAGE : 25/33
  1596.  
  1597.   TITLE : UPDATE TO VERSION 1.01A
  1598.  
  1599.  
  1600.  
  1601.  
  1602.   The modified lines of code are listed in the routines below with a comment
  1603.   at the end of the line {Ver. 1.01A - ...}. The comment indicates when the
  1604.   code is an addition deletion or modification.
  1605.  
  1606.   Notes:
  1607.  
  1608.   1.   These modifications will update the Turbo Editor Toolbox to  version
  1609.        1.01A. Therefore, you need to update the version numbers of the files:
  1610.        MS.PAS, VARS.MS, MSCMD.MS, PRINT.MS and  the copywrite message for
  1611.        MicroStar in MS.PAS.
  1612.  
  1613.   2.   Make these modifications on a COPY of the master diskettes - do NOT
  1614.        modify your master diskettes.
  1615.  
  1616.        1.   Load the file VARS.MS into the TURBO PASCAL editor.
  1617.  
  1618.        2.   Add a global variable to the file:
  1619.  
  1620.             PrintFileSize : real; { Ver. 1.01A Addition }
  1621.  
  1622.        3.   Save the file VARS.MS and Load the file MSCMD.MS into the
  1623.             editor.
  1624.  
  1625.   4.   At line 40 in the code:
  1626.  
  1627.      Change from:
  1628.        Reset(PrintFile);
  1629.  
  1630.      Change to:
  1631.        Reset(PrintFile,1);  { Ver. 1.01A Modification }
  1632.  
  1633.   5.   At line 45 in the code insert the statement:
  1634.  
  1635.        PrintFileSize := LongFileSize(PrintFile);
  1636.  
  1637.  
  1638.   6.   Save the file MSCMD.MS and Load the file PRINT.MS into the  editor.
  1639.  
  1640.   7.   At line 137 in the code:
  1641.  
  1642.      PREVENTS END OF FILE TRUCATION WHEN PRINTING
  1643.  
  1644.      Change from:
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  1658.                                                               : 205
  1659.   VERSION : 1.00B & 1.00C
  1660.        OS : PC-DOS
  1661.      DATE : August 20, 1986                            PAGE : 26/33
  1662.  
  1663.   TITLE : UPDATE TO VERSION 1.01A
  1664.  
  1665.  
  1666.  
  1667.  
  1668.        BlockRead(PrintFile, PrintBuffer, 1);
  1669.  
  1670.      Change to:
  1671.        if PrintFileSize >= 128 then      {Ver. 1.01A Addition}
  1672.        begin
  1673.          blockread(PrintFile,PrintBuffer,128); {Ver. 1.01A Modification}
  1674.          PrintFileSize := PrintFileSize - 128; {Ver. 1.01A Addition}
  1675.        end                                     {Ver. 1.01A Addition}
  1676.        else                                    {Ver. 1.01A Addition}
  1677.          blockread(PrintFile,PrintBuffer,trunc(PrintFileSize));
  1678.                                                {Ver. 1.01A Addition}
  1679.  
  1680.        SAVING TEXT FORMAT SETTINGS
  1681.  
  1682.   The  changes   to  the  Turbo Editor Toolbox  described  in  this  handout
  1683.   correct  the  Save  Default  Settings  command  so  that  MicroStar will
  1684.   properly initialize the settings the user saves.
  1685.  
  1686.     The routine to be modified is called:
  1687.  
  1688.       function EditCrewindow(Top:integer;Len:integer;Fn:varstring;
  1689.                              Cr:integer;Cc:integer):Pwindesc;
  1690.  
  1691.     This routine exists in the file:
  1692.  
  1693.        USER.MS - MicroStar Source Diskette
  1694.  
  1695.   The modified lines of code are listed in the routine below with a comment
  1696.   at the end of the line: { Ver. 1.01A - ... }. The comment indicates when
  1697.   the code is an addition, a deletion, or a modification.
  1698.  
  1699.   NOTES:
  1700.  
  1701.   1.   These modifications will update Turbo Editor Toolbox to
  1702.        version 1.01A. Therefore, you need to update the version
  1703.        numbers of the files: MS.PAS, and USER.MS. Also, update  the
  1704.        copy-right message for MicroStar in MS.PAS.
  1705.  
  1706.   2.   Make these modifications on a COPY of the master  diskettes,
  1707.        do NOT modify your master diskettes.
  1708.  
  1709.        The following are step-by-step instructions for making the
  1710.        modifications:
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.   PRODUCT : TURBO EDITOR TOOLBOX                                NUMBER
  1724.                                                               : 205
  1725.   VERSION : 1.00B & 1.00C
  1726.        OS : PC-DOS
  1727.      DATE : August 20, 1986                            PAGE : 27/33
  1728.  
  1729.   TITLE : UPDATE TO VERSION 1.01A
  1730.  
  1731.  
  1732.  
  1733.  
  1734.        1.   Load the file USER.MS into the Turbo Pascal editor.
  1735.        2.   Modify the code: .pa
  1736.  
  1737.    SAVING DAFAULT TEXT FORMAT SETTINGS
  1738.  
  1739.     In the function EditCreWindows, Change from:
  1740.            .
  1741.            .
  1742.       Filename := Fn;
  1743.       Insertflag := Insert;
  1744.       WW := false;
  1745.       AI := false;
  1746.       Firstlineno := Top;
  1747.            .
  1748.            .
  1749.  
  1750.     Change To:
  1751.            .
  1752.            .
  1753.       Filename := Fn;
  1754.       Insertflag := InsFlag(InsertDef);  { modified ver. 1.01A }
  1755.       WW := WordWpDef;                   { modified ver. 1.01A }
  1756.       AI := AutoInDef;                   { modified ver. 1.01A }
  1757.       Firstlineno := Top;
  1758.            .
  1759.            .
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.